import {BrowserRouter, Route, Routes} from "react-router-dom";
import {Post} from "../application/page/posts/Post.jsx";
import {Carousel} from "../application/page/carousel/Carousel.jsx";
import Home from "../application/page/home/Home.jsx";
import Nav from "../application/page/nav/Nav.jsx";
import {ErrorPage} from "../application/page/error/ErrorPage.jsx";
import {Questions} from "../application/page/questions/Questions.jsx";
import {RandomQuote} from "../application/page/random-quote/RandomQuote.jsx";
import ShoppingList from "../application/page/shopping-list/ShoppingList.jsx";
import {UserSearch} from "../application/page/user-search/UserSearch.jsx";

function Router() {
    return (
        <BrowserRouter>
            <Routes>
                <Route path="/" element={<Nav/>}>
                    <Route index element={<Home/>}/>
                    <Route path="posts" element={<Post/>}/>
                    <Route path="carousel" element={<Carousel/>}/>
                    <Route path="questions" element={<Questions/>}/>
                    <Route path="randomQuote" element={<RandomQuote/>}/>
                    <Route path="shoppingList" element={<ShoppingList/>}/>
                    <Route path="userSearch" element={<UserSearch/>}/>
                    <Route path="*" element={<ErrorPage/>}/>
                </Route>
            </Routes>
        </BrowserRouter>
    );
}

export default Router;